import request from '@/utils/request'

// 查询盘点任务列表
export function listArchiveStocktakingTask(query) {
  return request({
    url: '/archive/ArchiveStocktakingTask/list',
    method: 'get',
    params: query
  })
}

// 查询盘点任务详细
export function getArchiveStocktakingTask(taskId) {
  return request({
    url: '/archive/ArchiveStocktakingTask/' + taskId,
    method: 'get'
  })
}

// 新增盘点任务
export function addArchiveStocktakingTask(data) {
  return request({
    url: '/archive/ArchiveStocktakingTask',
    method: 'post',
    data: data
  })
}

// 修改盘点任务
export function updateArchiveStocktakingTask(data) {
  return request({
    url: '/archive/ArchiveStocktakingTask',
    method: 'put',
    data: data
  })
}

// 删除盘点任务
export function delArchiveStocktakingTask(taskId) {
  return request({
    url: '/archive/ArchiveStocktakingTask/' + taskId,
    method: 'delete'
  })
}
//根据taskid获取档案盒列表
export function selectBoxByTaskId(taskId) {
  return request({
    url: '/archive/ArchiveStocktakingBox/selectBoxByTaskId/' + taskId,
    method: 'get'
  })
}
//根据taskBoxId获取档案列表
export function selectArchiveListByTaskBoxId(taskBoxId) {
  return request({
    url: '/archive/ArchiveStocktaking/archiveList/' + taskBoxId,
    method: 'get'
  })
}

export function addArchiveStockBox(data) {
  return request({
    url: '/archive/ArchiveStocktakingBox/addStocktakingBox',
    method: 'post',
    data: data
  })
}
export function editArchiveStocktaking(data) {
  return request({
    url: '/archive/ArchiveStocktaking/editArchiveStocktaking',
    method: 'post',
    data: data
  })
}
export function editStocktakingBox(data) {
  return request({
    url: '/archive/ArchiveStocktakingBox/editStocktakingBox',
    method: 'post',
    data: data
  })
}
export function archivePDTaskResultReport(data) {
  return request({
    url:'/archive/ArchiveStocktakingTask/archiveStocktakingTaskResultReport',
    method: 'post',
    data: data
  })
}